home *** CD-ROM | disk | FTP | other *** search
/ An Invitation to the Roland World of Music / Roland - An Invitation To The Roland World Of Music.bin / vb / cooltool / knob / knob.frm next >
Text File  |  1995-04-21  |  17KB  |  553 lines

  1. VERSION 2.00
  2. Begin Form FormKnob 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Properties Example"
  6.    Height          =   4485
  7.    Left            =   930
  8.    LinkTopic       =   "Form1"
  9.    MaxButton       =   0   'False
  10.    ScaleHeight     =   4080
  11.    ScaleWidth      =   8445
  12.    Top             =   1050
  13.    Width           =   8565
  14.    Begin CommonDialog CMDialog1 
  15.       Left            =   240
  16.       Top             =   4230
  17.    End
  18.    Begin Frame Frame6 
  19.       BackColor       =   &H00C0C0C0&
  20.       Caption         =   "Knob Tick"
  21.       Height          =   2055
  22.       Left            =   6030
  23.       TabIndex        =   22
  24.       Top             =   60
  25.       Width           =   2355
  26.       Begin CommandButton CmdTickCaptionColor 
  27.          Caption         =   "Knob Tick Caption Color"
  28.          FontBold        =   0   'False
  29.          FontItalic      =   0   'False
  30.          FontName        =   "MS Sans Serif"
  31.          FontSize        =   8.25
  32.          FontStrikethru  =   0   'False
  33.          FontUnderline   =   0   'False
  34.          Height          =   315
  35.          Left            =   120
  36.          TabIndex        =   0
  37.          Top             =   1560
  38.          Width           =   2115
  39.       End
  40.       Begin HScrollBar HScrollTickWidth 
  41.          Height          =   255
  42.          LargeChange     =   5
  43.          Left            =   660
  44.          Max             =   10
  45.          TabIndex        =   1
  46.          Top             =   240
  47.          Value           =   2
  48.          Width           =   1575
  49.       End
  50.       Begin CommandButton CmdTickColor 
  51.          Caption         =   "Knob Tick Color"
  52.          FontBold        =   0   'False
  53.          FontItalic      =   0   'False
  54.          FontName        =   "MS Sans Serif"
  55.          FontSize        =   8.25
  56.          FontStrikethru  =   0   'False
  57.          FontUnderline   =   0   'False
  58.          Height          =   315
  59.          Left            =   120
  60.          TabIndex        =   2
  61.          Top             =   1200
  62.          Width           =   2115
  63.       End
  64.       Begin HScrollBar HScrollTickLength 
  65.          Height          =   255
  66.          LargeChange     =   5
  67.          Left            =   660
  68.          Max             =   20
  69.          TabIndex        =   24
  70.          Top             =   540
  71.          Value           =   8
  72.          Width           =   1575
  73.       End
  74.       Begin HScrollBar HScrollTickGap 
  75.          Height          =   255
  76.          LargeChange     =   5
  77.          Left            =   660
  78.          Max             =   10
  79.          Min             =   1
  80.          TabIndex        =   23
  81.          Top             =   840
  82.          Value           =   2
  83.          Width           =   1575
  84.       End
  85.       Begin Label Label1 
  86.          BackColor       =   &H00C0C0C0&
  87.          Caption         =   "Width"
  88.          FontBold        =   0   'False
  89.          FontItalic      =   0   'False
  90.          FontName        =   "MS Sans Serif"
  91.          FontSize        =   8.25
  92.          FontStrikethru  =   0   'False
  93.          FontUnderline   =   0   'False
  94.          Height          =   255
  95.          Left            =   120
  96.          TabIndex        =   3
  97.          Top             =   240
  98.          Width           =   495
  99.       End
  100.       Begin Label Label2 
  101.          BackColor       =   &H00C0C0C0&
  102.          Caption         =   "Length"
  103.          FontBold        =   0   'False
  104.          FontItalic      =   0   'False
  105.          FontName        =   "MS Sans Serif"
  106.          FontSize        =   8.25
  107.          FontStrikethru  =   0   'False
  108.          FontUnderline   =   0   'False
  109.          Height          =   255
  110.          Left            =   120
  111.          TabIndex        =   16
  112.          Top             =   540
  113.          Width           =   495
  114.       End
  115.       Begin Label Label4 
  116.          BackColor       =   &H00C0C0C0&
  117.          Caption         =   "Gap"
  118.          FontBold        =   0   'False
  119.          FontItalic      =   0   'False
  120.          FontName        =   "MS Sans Serif"
  121.          FontSize        =   8.25
  122.          FontStrikethru  =   0   'False
  123.          FontUnderline   =   0   'False
  124.          Height          =   255
  125.          Left            =   120
  126.          TabIndex        =   17
  127.          Top             =   840
  128.          Width           =   495
  129.       End
  130.    End
  131.    Begin Frame Frame5 
  132.       BackColor       =   &H00C0C0C0&
  133.       Caption         =   "Knob Bevel"
  134.       Height          =   675
  135.       Left            =   6030
  136.       TabIndex        =   14
  137.       Top             =   2490
  138.       Width           =   2355
  139.       Begin HScrollBar HScrollBevelWidth 
  140.          Height          =   255
  141.          LargeChange     =   5
  142.          Left            =   120
  143.          Max             =   10
  144.          TabIndex        =   15
  145.          Top             =   300
  146.          Value           =   2
  147.          Width           =   2115
  148.       End
  149.    End
  150.    Begin Frame Frame4 
  151.       BackColor       =   &H00C0C0C0&
  152.       Caption         =   "MIDI CoolTools Knob"
  153.       Height          =   3135
  154.       Left            =   2520
  155.       TabIndex        =   13
  156.       Top             =   60
  157.       Width           =   3435
  158.       Begin Knob Knob1 
  159.          BackColor       =   &H00C0C0C0&
  160.          BevelWidth      =   2
  161.          BorderWidth     =   5
  162.          FontBold        =   -1  'True
  163.          FontItalic      =   0   'False
  164.          FontName        =   "Small Fonts"
  165.          FontSize        =   6
  166.          FontStrikethru  =   0   'False
  167.          FontUnderline   =   0   'False
  168.          Height          =   2715
  169.          Indicator       =   0  'Spot
  170.          IndicatorColor  =   &H000000FF&
  171.          IndicatorWidth  =   1
  172.          KnobColor       =   &H00C0C0C0&
  173.          KnobStyle       =   1  'Raised
  174.          Left            =   120
  175.          LinkControl     =   ""
  176.          LinkProperty    =   ""
  177.          Max             =   100
  178.          Min             =   0
  179.          Radius          =   285
  180.          TickCaptionColor=   &H00000000&
  181.          TickCaptions    =   KNOB.FRX:0000
  182.          TickColor       =   &H00000000&
  183.          TickCount       =   3
  184.          TickGap         =   2
  185.          TickLength      =   8
  186.          TickWidth       =   1
  187.          Top             =   330
  188.          Value           =   0
  189.          Width           =   3195
  190.       End
  191.    End
  192.    Begin Frame Frame3 
  193.       BackColor       =   &H00C0C0C0&
  194.       Caption         =   "Knob Style"
  195.       Height          =   1635
  196.       Left            =   60
  197.       TabIndex        =   10
  198.       Top             =   60
  199.       Width           =   2385
  200.       Begin OptionButton OptionKnobStyle 
  201.          BackColor       =   &H00C0C0C0&
  202.          Caption         =   "Textured"
  203.          FontBold        =   0   'False
  204.          FontItalic      =   0   'False
  205.          FontName        =   "MS Sans Serif"
  206.          FontSize        =   8.25
  207.          FontStrikethru  =   0   'False
  208.          FontUnderline   =   0   'False
  209.          Height          =   195
  210.          Index           =   3
  211.          Left            =   1140
  212.          TabIndex        =   18
  213.          Top             =   540
  214.          Width           =   915
  215.       End
  216.       Begin OptionButton OptionKnobStyle 
  217.          BackColor       =   &H00C0C0C0&
  218.          Caption         =   "Lowered"
  219.          FontBold        =   0   'False
  220.          FontItalic      =   0   'False
  221.          FontName        =   "MS Sans Serif"
  222.          FontSize        =   8.25
  223.          FontStrikethru  =   0   'False
  224.          FontUnderline   =   0   'False
  225.          Height          =   195
  226.          Index           =   2
  227.          Left            =   150
  228.          TabIndex        =   19
  229.          Top             =   540
  230.          Width           =   915
  231.       End
  232.       Begin OptionButton OptionKnobStyle 
  233.          BackColor       =   &H00C0C0C0&
  234.          Caption         =   "Raised"
  235.          FontBold        =   0   'False
  236.          FontItalic      =   0   'False
  237.          FontName        =   "MS Sans Serif"
  238.          FontSize        =   8.25
  239.          FontStrikethru  =   0   'False
  240.          FontUnderline   =   0   'False
  241.          Height          =   195
  242.          Index           =   1
  243.          Left            =   1140
  244.          TabIndex        =   20
  245.          Top             =   300
  246.          Value           =   -1  'True
  247.          Width           =   915
  248.       End
  249.       Begin OptionButton OptionKnobStyle 
  250.          BackColor       =   &H00C0C0C0&
  251.          Caption         =   "Circle"
  252.          FontBold        =   0   'False
  253.          FontItalic      =   0   'False
  254.          FontName        =   "MS Sans Serif"
  255.          FontSize        =   8.25
  256.          FontStrikethru  =   0   'False
  257.          FontUnderline   =   0   'False
  258.          Height          =   195
  259.          Index           =   0
  260.          Left            =   150
  261.          TabIndex        =   21
  262.          Top             =   300
  263.          Width           =   915
  264.       End
  265.       Begin CommandButton CmdKnobColor 
  266.          Caption         =   "Knob Color"
  267.          FontBold        =   0   'False
  268.          FontItalic      =   0   'False
  269.          FontName        =   "MS Sans Serif"
  270.          FontSize        =   8.25
  271.          FontStrikethru  =   0   'False
  272.          FontUnderline   =   0   'False
  273.          Height          =   315
  274.          Left            =   150
  275.          TabIndex        =   12
  276.          Top             =   810
  277.          Width           =   2115
  278.       End
  279.       Begin CommandButton CmdKnobBckGrdColor 
  280.          Caption         =   "Knob Back Ground Color"
  281.          FontBold        =   0   'False
  282.          FontItalic      =   0   'False
  283.          FontName        =   "MS Sans Serif"
  284.          FontSize        =   8.25
  285.          FontStrikethru  =   0   'False
  286.          FontUnderline   =   0   'False
  287.          Height          =   315
  288.          Left            =   150
  289.          TabIndex        =   11
  290.          Top             =   1170
  291.          Width           =   2115
  292.       End
  293.    End
  294.    Begin Frame Frame2 
  295.       BackColor       =   &H00C0C0C0&
  296.       Caption         =   "Knob Indicator"
  297.       Height          =   1455
  298.       Left            =   60
  299.       TabIndex        =   6
  300.       Top             =   1740
  301.       Width           =   2385
  302.       Begin OptionButton OptionIndicator 
  303.          BackColor       =   &H00C0C0C0&
  304.          Caption         =   "Line"
  305.          FontBold        =   0   'False
  306.          FontItalic      =   0   'False
  307.          FontName        =   "MS Sans Serif"
  308.          FontSize        =   8.25
  309.          FontStrikethru  =   0   'False
  310.          FontUnderline   =   0   'False
  311.          Height          =   225
  312.          Index           =   1
  313.          Left            =   1320
  314.          TabIndex        =   26
  315.          Top             =   300
  316.          Width           =   825
  317.       End
  318.       Begin OptionButton OptionIndicator 
  319.          BackColor       =   &H00C0C0C0&
  320.          Caption         =   "Spot"
  321.          FontBold        =   0   'False
  322.          FontItalic      =   0   'False
  323.          FontName        =   "MS Sans Serif"
  324.          FontSize        =   8.25
  325.          FontStrikethru  =   0   'False
  326.          FontUnderline   =   0   'False
  327.          Height          =   225
  328.          Index           =   0
  329.          Left            =   180
  330.          TabIndex        =   25
  331.          Top             =   300
  332.          Value           =   -1  'True
  333.          Width           =   825
  334.       End
  335.       Begin CommandButton CmdKnobIndicatorColor 
  336.          Caption         =   "Knob Indicator Color"
  337.          FontBold        =   0   'False
  338.          FontItalic      =   0   'False
  339.          FontName        =   "MS Sans Serif"
  340.          FontSize        =   8.25
  341.          FontStrikethru  =   0   'False
  342.          FontUnderline   =   0   'False
  343.          Height          =   315
  344.          Left            =   90
  345.          TabIndex        =   8
  346.          Top             =   1020
  347.          Width           =   2115
  348.       End
  349.       Begin HScrollBar HScrollIndicatorWidth 
  350.          Enabled         =   0   'False
  351.          Height          =   255
  352.          LargeChange     =   2
  353.          Left            =   630
  354.          Max             =   7
  355.          Min             =   1
  356.          TabIndex        =   7
  357.          Top             =   660
  358.          Value           =   1
  359.          Width           =   1575
  360.       End
  361.       Begin Label Label3 
  362.          BackColor       =   &H00C0C0C0&
  363.          Caption         =   "Width"
  364.          FontBold        =   0   'False
  365.          FontItalic      =   0   'False
  366.          FontName        =   "MS Sans Serif"
  367.          FontSize        =   8.25
  368.          FontStrikethru  =   0   'False
  369.          FontUnderline   =   0   'False
  370.          Height          =   255
  371.          Left            =   90
  372.          TabIndex        =   9
  373.          Top             =   660
  374.          Width           =   495
  375.       End
  376.    End
  377.    Begin Frame Frame1 
  378.       BackColor       =   &H00C0C0C0&
  379.       Caption         =   "Knob Radius"
  380.       Height          =   675
  381.       Left            =   60
  382.       TabIndex        =   4
  383.       Top             =   3270
  384.       Width           =   8355
  385.       Begin HScrollBar HScrollRadius 
  386.          Height          =   255
  387.          LargeChange     =   50
  388.          Left            =   90
  389.          Max             =   950
  390.          Min             =   140
  391.          SmallChange     =   10
  392.          TabIndex        =   5
  393.          Top             =   300
  394.          Value           =   300
  395.          Width           =   8175
  396.       End
  397.    End
  398. End
  399.  
  400. Sub CmdKnobBckGrdColor_Click ()
  401.     '
  402.     ' Load the control with the current (or last selected) shapes
  403.     ' FillColor
  404.     '
  405.     CMDialog1.Color = Knob1.BackColor
  406.     '
  407.     ' Execute the color select dialog
  408.     '
  409.     CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
  410.     CMDialog1.Action = DLG_COLOR
  411.     '
  412.     ' Assign the selected color to the shape's color properties
  413.     '
  414.     Knob1.BackColor = CMDialog1.Color
  415.  
  416. End Sub
  417.  
  418. Sub CmdKnobColor_Click ()
  419.     '
  420.     ' Load the control with the current (or last selected) shapes
  421.     ' FillColor
  422.     '
  423.     CMDialog1.Color = Knob1.KnobColor
  424.     '
  425.     ' Execute the color select dialog
  426.     '
  427.     CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
  428.     CMDialog1.Action = DLG_COLOR
  429.     '
  430.     ' Assign the selected color to the shape's color properties
  431.     '
  432.     Knob1.KnobColor = CMDialog1.Color
  433. End Sub
  434.  
  435. Sub CmdKnobIndicatorColor_Click ()
  436.     '
  437.     ' Load the control with the current (or last selected) shapes
  438.     ' FillColor
  439.     '
  440.     CMDialog1.Color = Knob1.IndicatorColor
  441.     '
  442.     ' Execute the color select dialog
  443.     '
  444.     CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
  445.     CMDialog1.Action = DLG_COLOR
  446.     '
  447.     ' Assign the selected color to the shape's color properties
  448.     '
  449.     Knob1.IndicatorColor = CMDialog1.Color
  450.  
  451.  
  452. End Sub
  453.  
  454. Sub CmdTickCaptionColor_Click ()
  455.     '
  456.     ' Load the control with the current (or last selected) shapes
  457.     ' FillColor
  458.     '
  459.     CMDialog1.Color = Knob1.TickCaptionColor
  460.     '
  461.     ' Execute the color select dialog
  462.     '
  463.     CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
  464.     CMDialog1.Action = DLG_COLOR
  465.     '
  466.     ' Assign the selected color to the shape's color properties
  467.     '
  468.     Knob1.TickCaptionColor = CMDialog1.Color
  469.  
  470. End Sub
  471.  
  472. Sub CmdTickColor_Click ()
  473.     '
  474.     ' Load the control with the current (or last selected) shapes
  475.     ' FillColor
  476.     '
  477.     CMDialog1.Color = Knob1.TickColor
  478.     '
  479.     ' Execute the color select dialog
  480.     '
  481.     CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
  482.     CMDialog1.Action = DLG_COLOR
  483.     '
  484.     ' Assign the selected color to the shape's color properties
  485.     '
  486.     Knob1.TickColor = CMDialog1.Color
  487.  
  488. End Sub
  489.  
  490. Sub Form_Load ()
  491.     ' Center the form on the screen
  492.     'Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  493. End Sub
  494.  
  495. Sub HScrollBevelWidth_Change ()
  496.     Knob1.BevelWidth = HScrollBevelWidth.Value
  497. End Sub
  498.  
  499. Sub HScrollBevelWidth_Scroll ()
  500.     Knob1.BevelWidth = HScrollBevelWidth.Value
  501. End Sub
  502.  
  503. Sub HScrollIndicatorWidth_Change ()
  504.     Knob1.IndicatorWidth = HScrollIndicatorWidth.Value
  505. End Sub
  506.  
  507. Sub HScrollIndicatorWidth_Scroll ()
  508.     Knob1.IndicatorWidth = HScrollIndicatorWidth.Value
  509. End Sub
  510.  
  511. Sub HScrollRadius_Change ()
  512.     Knob1.Radius = HScrollRadius.Value
  513. End Sub
  514.  
  515. Sub HScrollRadius_Scroll ()
  516.     Knob1.Radius = HScrollRadius.Value
  517. End Sub
  518.  
  519. Sub HScrollTickGap_Change ()
  520.     Knob1.TickGap = HScrollTickGap.Value
  521. End Sub
  522.  
  523. Sub HScrollTickGap_Scroll ()
  524.     Knob1.TickGap = HScrollTickGap.Value
  525. End Sub
  526.  
  527. Sub HScrollTickLength_Change ()
  528.     Knob1.TickLength = HScrollTickLength.Value
  529. End Sub
  530.  
  531. Sub HScrollTickLength_Scroll ()
  532.     Knob1.TickLength = HScrollTickLength.Value
  533. End Sub
  534.  
  535. Sub HScrollTickWidth_Change ()
  536.     Knob1.TickWidth = HScrollTickWidth.Value
  537. End Sub
  538.  
  539. Sub HScrollTickWidth_Scroll ()
  540.     Knob1.TickWidth = HScrollTickWidth.Value
  541. End Sub
  542.  
  543. Sub OptionIndicator_Click (index As Integer)
  544.     Knob1.Indicator = index
  545.     If index = 0 Then HScrollIndicatorWidth.Enabled = False Else HScrollIndicatorWidth.Enabled = True
  546. End Sub
  547.  
  548. Sub OptionKnobStyle_Click (index As Integer)
  549.     Knob1.KnobStyle = index
  550.     If index = 3 Then HScrollBevelWidth.Enabled = False Else HScrollBevelWidth.Enabled = True
  551. End Sub
  552.  
  553.